package com.md.rps.service;

import com.md.rps.mybatis.interfaces.I_EMPLOYEE;
import com.md.rps.mybatis.model.EMPLOYEE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeOperator {
    @Autowired
    private I_EMPLOYEE i_employee;

    // 获取所有医生列表
    public List<EMPLOYEE> getDoctorsList( int start, int end){
        return i_employee.getDoctorsList(start, end);
    }

    // 根据科室查看医生列表
    public List<EMPLOYEE> getDoctorsListByDept(int dept){
        return i_employee.getDoctorsListByDept(dept);
    }

    // 查看指定医生
    public EMPLOYEE getDoctor(int id){
        return i_employee.getDoctor(id);
    }

    // 获取所有护士列表
    public List<EMPLOYEE> getNurseList( int start, int end){
        return i_employee.getNurseList(start, end);
    }

    // 获取所有管理人员列表
    public List<EMPLOYEE> getManagerList( int start, int end){
        return i_employee.getManagerList(start,end);
    }

    // 添加员工
    public int addEmployee(EMPLOYEE employee){
        return i_employee.addEmployee(employee);
    }

    // 修改员工
    public int updateEmployee(EMPLOYEE employee){
        return i_employee.updateEmployee(employee);
    }

    // 删除员工
    public int deleteEmployee(int id){
        return i_employee.deleteEmployee(id);
    }
}
